import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class ArrayTest3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入第一个数字");
        int x = sc.nextInt();
        System.out.println("请输入第二个数字");
        int y = sc.nextInt();
        System.out.println("请输入第三个数字");
        int z = sc.nextInt();
        int[] array = new int[]{x,y,z};
        int max = array[0];
        int min = array[0];
        int mid = 0;
        for (int i = 1 ;i<array.length; i++){
            if (array[i]>max){
                max = array[i];
            }
            if (array[i]<min){
                min = array[i];
            }
        }
        for (int i = 0;i<array.length;i++){
            if (array[i] != max){
                if (array[i] != min){
                    mid = array[i];
                }
            }
        }
        System.out.println(min+","+mid+","+max);


//        if(x>y && y>z){
//            System.out.println(z+","+y+","+x);
//        }
//        if(x>y && z>y ){
//            System.out.println(y+","+z+","+x);
//        }
//        if (y>x && x>z){
//            System.out.println(z+","+x+","+y);
//        }
//        if (y>x && z>x){
//            System.out.println(x+","+z+","+y);
//        }
//        if(z>x && x>y){
//            System.out.println(y+","+x+","+z);
//        }
//        if (z>x && y>x){
//            System.out.println(x+","+y+","+z);
//        }
    }
}
